
Blockly.defineBlocksWithJsonArray([
  {
  "type": "send_value",
  // "message0": " wait %1 seconds",
  "message0": "向设备发送值 %1 ",
  "args0": [
    {
    "type": "input_value",  //input_value  field_number
    "name": "Device"
    }
  ],
  "previousStatement": null,
  "nextStatement": null,
  "colour": "%{BKY_LISTS_HUE}"
  }
]);



Blockly.Lua['send_value'] = function(block) {
  var argument = Blockly.Lua.valueToCode(block, 'Device',
      Blockly.Lua.ORDER_NONE) || '0';
  // var varName = Blockly.Lua.variableDB_.getName(
  //     block.getFieldValue('VAR'), Blockly.Variables.NAME_TYPE);
  return  'sendValue(' + argument  + ')\n';
};




